
<!--头部-->
<div class="top-box">
	<div class="top">
		<div class="top-left">
			<ul class="left-ul">
				<li><a href="" class="a">个人及家用</a></li>
				<li><a href="" class="a">个人及家用</a></li>
				<li><a href="" class="a">个人及家用</a></li>
				<li><a href="" class="a">个人及家用</a></li>
				<li><a href="" class="a">个人及家用</a></li>
				<li><a href="" class="c">个人及家用</a></li>
			</ul>
		</div>
		<div class="top-right">
			<ul class="right-ul">
				<li><a href="shopping.html">购物车</a></li>
				<?php if(isset($_SESSION['username'])){?>
                
				<li><a href="javascript:;" class="order">我的订单</a> | </li>
				<li>
					<a href="javascript:;" class="username" username="0"><?php echo $_SESSION['username']?></a> | 
					<div class="outlogin-box"><a href="<?php echo U('Login/out')?>">退出登录</a></div>
				</li>
				<?php }else{?>
				<li><a href="javascript:;" class="zhuc">注册</a> | </li>
				<li><a href="javascript:;" class="dengl">登录</a> | </li>
				
               <?php }?>
			</ul>
		</div>
	</div>
</div>
<!--索引-->
<div class="logo">
	<div class="logo-left">
		<a href="<?php echo U('Index/index')?>"><div></div></a>
	</div>
	<div class="logo-right">
		<div>
			<div class="indexed"></div>
			<input type="text" name="" id="" placeholder="请输入"/>
		</div>
	</div>
	<div class="value">
		<ul>
			<li><a href="">乐檬X3</a></li>
			<li><a href="">小新笔记本</a></li>
			<li><a href="">YOGA 4 Pro</a></li>
			<li><a href="">ThinkPad X1系列</a></li>
			<li><a href="">联想P1</a></li>
			<li><a href="">看家宝</a></li>
		</ul>
	</div>
</div>
<div class="cateT">
	<div class="cateLeft"></div>
	<div class="cateRight">
		<?php 
			$category = new \Common\Model\Category;
			$categoryData = $category->where("pid=0")->get();
		 ?>
		<ul>
			<li><a href="<?php echo U('Index/index')?>">首页</a></li>
			<?php foreach ($categoryData as $v){?>
			<?php if($v['pid']==0){?>
                
			<li><a href="<?php echo U('List/index',array('cid'=>$v['cid']))?>"><?php echo $v['cname']?></a></li>
			
               <?php }?>
			<?php }?>
		</ul>
	</div>
</div>
<script type="text/javascript">
	$(function(){
		$('.username').click(function(){
			if($(this).attr('username') == 0){
				$('.outlogin-box').fadeIn();
				$(this).attr('username','1');
			}else{
				$('.outlogin-box').fadeOut();
				$(this).attr('username','0');
			}
		})
	})
</script>